#pragma once
#include <list>
#include <map>

struct ControllCommand
{
	static const unsigned short MoveForward = 0x0010;
	static const unsigned short MoveBackward = 0x0020;
	static const unsigned short MoveRightward = 0x0040;
	static const unsigned short MoveLeftward = 0x0080;
	static const unsigned short Jump = 0x00100;
	static const unsigned short Attack1 = 0x00200;
	static const unsigned short Attack2 = 0x00400;
	static const unsigned short Attack3 = 0x00800;
};

struct TimPrtor
{
	uint32_t ts;
};

struct PlayerMatching
{
	unsigned char PlayerID;
	unsigned short RoomId;
	unsigned char TeamType;
	unsigned char NameSize;
	unsigned char Name[12];
	void *RUDPSes;
	void *Addr;
	uint64_t ts;
};

struct PlayerReady
{
	unsigned char PlayerID;
	unsigned short RoomId;
};

struct PlayerInput
{
	unsigned char PlayerID;
	unsigned short RoomId;
	unsigned short Controll;
};

struct PlayerInfo
{
	unsigned char playerId;
	bool ready;
	void *RUDPSes;
	void *Addr;
};

struct TeamMode
{
	static const unsigned char Solo = 2;
	static const unsigned char Dou = 4;
	static const unsigned char Squad = 8;
};

struct PlayerController
{
	std::map<uint32_t, std::list<unsigned short>> playerControll;
	std::map<uint32_t, PlayerInfo> playersInfo;
	uint32_t ts;
};

struct Talker
{
	void *Addr;
	uint8_t flag;
};
